import {
  request
} from '../fetch'

// 用户更改个人信息
export function userUpdateAPI(params) {
  return request({
    url: '/user/update',
    method: 'get',
    params
  })
}

// 用户获取个人信息
export function userGetAPI(params) {
  return request({
    url: '/user/get',
    method: 'get',
    params
  })
}

// 获取部门列表
export function departmentPageAPI(params) {
  return request({
    url: '/department/list',
    method: 'get',
    params
  })
}

// 访客预约
export function visitFlowApplyAPI(params) {
  return request({
    url: '/visitFlow/apply',
    method: 'get',
    params
  })
}

// 预约记录
export function visitFlowPageAPI(params) {
  return request({
    url: '/visitFlow/page',
    method: 'get',
    params
  })
}

// 管理员审核
export function visitFlowAuthorizeAPI(params) {
  return request({
    url: '/visitFlow/authorize',
    method: 'get',
    params
  })
}

// 根据手机号获取姓名
export function getNameByPhoneAPI(params) {
  return request({
    url: '/user/getNameByPhone',
    method: 'get',
    params
  })
}

// 签离
export function visitFlowLeaveAPI(params) {
  return request({
    url: '/visitFlow/leave',
    method: 'get',
    params
  })
}

// 查看自己的审核状态
export function staffApplyStatusAPI(params) {
  return request({
    url: 'staffApply/get',
    method: 'get',
    params
  })
}

// 访客申请成为员工
export function staffApplyAPI(data) {
  return request({
    url: '/staffApply/apply',
    method: 'post',
    data
  })
}
